window.addEventListener('load', function () {
    let shao = document.querySelector('.shao');
    let shaod = document.querySelector('.shaod');
    let zhan = document.querySelector('.zhan');
    let zhand = document.querySelector('.zhand');

    shao.addEventListener('click', function () {
        this.style.color = '#c81623';
        zhan.style.color = '#666';
        zhand.style.display = 'none';
        shaod.style.display = 'block';
    })
    zhan.addEventListener('click', function () {
        this.style.color = '#c81623';
        shao.style.color = '#666';
        zhand.style.display = 'block';
        shaod.style.display = 'none';
    })
    //tab栏切换完成
    let check = document.querySelector('.cn14');
    let text = document.querySelector('.text');
    console.log(text);

    if (localStorage.getItem('uname')) {
        text.value = localStorage.getItem('uname');
        check.checked = true;
    }
    check.addEventListener('change', function () {
        if (check.checked) {
            localStorage.setItem('uname', text.value);
        }
        else {
            localStorage.removeItem('uname');
        }
    })
    text.addEventListener('focus', function () {
        check.checked = false;
        localStorage.removeItem('uname');
    })
    //记住我模块
})